<?php

namespace App\Http\Controllers;
use Request;
use DB;

/**
 * Class Controller
 * @package App\Http\Controllers
 */
class RedisController extends Controller
{

    /**
     * @param string $name
     * @param array $arguments
     * @return string
     */
    public function __call($name, $arguments)
    {
        return $this->returnJson(-404, '404 not found: Method ' . $name . ' not exist');
    }

    /**
     * @param $act
     * @param Request $request
     */
    function getWay($act, Request $request)
    {
        return $this->$act($request);
    }

    function set()
    {
        return $this->setRedisCache('name', 'Evai');
    }

    function get(Request $request)
    {
        return $this->getRedisCache('name');
    }

    function del()
    {
        return $this->delRedisCache('name');
    }

}
